//
//  YWKLoginAndRegistModel.h
//  YWKUser
//
//  Created by Admin on 16/5/10.
//  Copyright © 2016年 iCareTech. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol YWKLoginAndRegistModelDelegate <NSObject>

@optional

- (void)checkUserNameHasexisted:(NSDictionary *)response;
- (void)registResult:(NSDictionary *)response;
- (void)getVerificationCode:(NSString *)code;
- (void)getVerificationCodeFailed;
- (void)modifyPasswordResult:(NSDictionary *)response;
- (void)failedWithResponse:(id)response;

@end
@interface YWKLoginAndRegistModel : NSObject

@property (nonatomic, weak)id <YWKLoginAndRegistModelDelegate> loginAndRegistDelegate;

- (void)fetchDataWithUserName:(NSString *)name;
- (void)fetchDataWithTelephone:(NSString *)telephone;
- (void)requestVerificationCodeAPIWithTelephone:(NSString *)telephone;
- (void)requestVerificationCodeAPIWithName:(NSString *)name;
- (void)registerWithTelephone:(NSString *)phoneNumber
             verificationCode:(NSString *)code
                     password:(NSString *)password
                     roleType:(NSInteger)roleType;
- (void)modifyPasswordWithPhoneOrName:(NSString *)string
                    verificationCode:(NSString *)code
                            password:(NSString *)password;
- (void)modifyPasswordWithPhoneOrName:(NSString *)string
                          oldPassword:(NSString *)old
                           newPassword:(NSString *)newPassword;
@end
